/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author roycalderon
 */
@Embeddable
public class BookListPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idbookList")
    private int idbookList;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bookBorrowing_idbookBorrowing")
    private int bookBorrowingidbookBorrowing;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bookBorrowing_Employee_idEmployee")
    private int bookBorrowingEmployeeidEmployee;
    @Basic(optional = false)
    @NotNull
    @Column(name = "bookBorrowing_Student_idStudent")
    private int bookBorrowingStudentidStudent;

    public BookListPK() {
    }

    public BookListPK(int idbookList, int bookBorrowingidbookBorrowing, int bookBorrowingEmployeeidEmployee, int bookBorrowingStudentidStudent) {
        this.idbookList = idbookList;
        this.bookBorrowingidbookBorrowing = bookBorrowingidbookBorrowing;
        this.bookBorrowingEmployeeidEmployee = bookBorrowingEmployeeidEmployee;
        this.bookBorrowingStudentidStudent = bookBorrowingStudentidStudent;
    }

    public int getIdbookList() {
        return idbookList;
    }

    public void setIdbookList(int idbookList) {
        this.idbookList = idbookList;
    }

    public int getBookBorrowingidbookBorrowing() {
        return bookBorrowingidbookBorrowing;
    }

    public void setBookBorrowingidbookBorrowing(int bookBorrowingidbookBorrowing) {
        this.bookBorrowingidbookBorrowing = bookBorrowingidbookBorrowing;
    }

    public int getBookBorrowingEmployeeidEmployee() {
        return bookBorrowingEmployeeidEmployee;
    }

    public void setBookBorrowingEmployeeidEmployee(int bookBorrowingEmployeeidEmployee) {
        this.bookBorrowingEmployeeidEmployee = bookBorrowingEmployeeidEmployee;
    }

    public int getBookBorrowingStudentidStudent() {
        return bookBorrowingStudentidStudent;
    }

    public void setBookBorrowingStudentidStudent(int bookBorrowingStudentidStudent) {
        this.bookBorrowingStudentidStudent = bookBorrowingStudentidStudent;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idbookList;
        hash += (int) bookBorrowingidbookBorrowing;
        hash += (int) bookBorrowingEmployeeidEmployee;
        hash += (int) bookBorrowingStudentidStudent;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BookListPK)) {
            return false;
        }
        BookListPK other = (BookListPK) object;
        if (this.idbookList != other.idbookList) {
            return false;
        }
        if (this.bookBorrowingidbookBorrowing != other.bookBorrowingidbookBorrowing) {
            return false;
        }
        if (this.bookBorrowingEmployeeidEmployee != other.bookBorrowingEmployeeidEmployee) {
            return false;
        }
        if (this.bookBorrowingStudentidStudent != other.bookBorrowingStudentidStudent) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.BookListPK[ idbookList=" + idbookList + ", bookBorrowingidbookBorrowing=" + bookBorrowingidbookBorrowing + ", bookBorrowingEmployeeidEmployee=" + bookBorrowingEmployeeidEmployee + ", bookBorrowingStudentidStudent=" + bookBorrowingStudentidStudent + " ]";
    }
    
}
